<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html">
</head>
<style>
    .el-table .red-row {
        background: #ef702354;
    }
</style>
<body>
<div id="rrapp" v-cloak>
    <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">

        <el-tab-pane label="冻结订单" name="first" style="width: 100%">
            <!--查询-->
            <el-form :inline="true" class="demo-form-inline" size="small">
                <el-form-item label="订单金额ID">
                    <el-input v-model="qFreeze.orderAccountId" ></el-input>
                </el-form-item>
                <el-form-item label="订单ID">
                    <el-input v-model="qFreeze.orderId" ></el-input>
                </el-form-item>
                <el-form-item label="下单日期">
                    <el-date-picker
                            style="width: 300px"
                            v-model="qFreeze.orderCreateTime"
                            type="daterange"
                            align="right"
                            value-format="yyyy-MM-dd"
                            unlink-panels
                            start-placeholder="开始日期"
                            end-placeholder="结束日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item label="完成日期">
                    <el-date-picker
                            style="width: 300px"
                            v-model="qFreeze.receivedTime"
                            type="daterange"
                            align="right"
                            value-format="yyyy-MM-dd"
                            unlink-panels
                            start-placeholder="开始日期"
                            end-placeholder="结束日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="searchFreeze">查询</el-button>
                </el-form-item>
            </el-form>

            <!--冻结订单表格-->
            <el-table size="small" :data="orderAccountFreezeData" border style="width: 100%">

                <el-table-column    prop="orderAccountId"  label="订单金额ID"  >  </el-table-column>

                <el-table-column    prop="orderId"  label="订单ID" width="150"  >  </el-table-column>

                <el-table-column    prop="sellerName"  label="商家"  width="200">  </el-table-column>

                <el-table-column    prop="isAllot"  label="分配"  >  </el-table-column>

                <el-table-column    prop="status"  label="订单状态"  >  </el-table-column>

                <el-table-column    prop="source"  label="订单来源"  >  </el-table-column>

                <el-table-column    prop="totalAmount"  label="商品总值"  >  </el-table-column>

                <el-table-column    prop="costFreight"  label="配送费用"  >  </el-table-column>

                <el-table-column    prop="discount"  label="调价"  >  </el-table-column>

                <el-table-column    prop="pmtGoods"  label="商品促销优惠"  >  </el-table-column>

                <el-table-column    prop="pmtOrder"  label="优惠卷优惠"  >  </el-table-column>

                <el-table-column    prop="pmtRandom"  label="随机立减"  >  </el-table-column>

                <el-table-column    prop="payed"  label="已支付金额"  >  </el-table-column>

                <el-table-column    prop="payment"  label="支付方式"  >  </el-table-column>

                <el-table-column    prop="orderCreateTime"  label="下单时间"  width="150" >  </el-table-column>

                <el-table-column    prop="receivedTime"  label="收货时间"  width="150"  >  </el-table-column>

                <el-table-column    prop="fundState"  label="打款状态"  >  </el-table-column>

            </el-table>

            <!--分页插件-->
            <div style="text-align: center;margin: 15px">
                <el-pagination
                        @size-change="handleFreezeSizeChange"
                        @current-change="handleFreezeCurrentChange"
                        :current-page="pageFreeze.currentPage"
                        :page-sizes="pageFreeze.pageSizes"
                        :page-size="pageFreeze.pageSize"
                        layout="total, sizes, prev, pager, next"
                        :total="pageFreeze.total">
                </el-pagination>
            </div>
        </el-tab-pane>

        <el-tab-pane label="可提现订单" name="second">
            <!--查询-->
            <el-form :inline="true" class="demo-form-inline" size="small">
                <el-form-item label="订单金额ID">
                    <el-input v-model="q.orderAccountId" ></el-input>
                </el-form-item>
                <el-form-item label="订单ID">
                    <el-input v-model="q.orderId" ></el-input>
                </el-form-item>
                <el-form-item label="下单日期">
                    <el-date-picker
                            style="width: 300px"
                            v-model="q.orderCreateTime"
                            type="daterange"
                            align="right"
                            value-format="yyyy-MM-dd"
                            unlink-panels
                            start-placeholder="开始日期"
                            end-placeholder="结束日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item label="完成日期">
                    <el-date-picker
                            style="width: 300px"
                            v-model="q.receivedTime"
                            type="daterange"
                            align="right"
                            value-format="yyyy-MM-dd"
                            unlink-panels
                            start-placeholder="开始日期"
                            end-placeholder="结束日期">
                    </el-date-picker>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="search">查询</el-button>
                    <el-button type="success" @click="applyCash">申请提现</el-button>
                </el-form-item>
                <template v-if="applyCashRule != null">
                    <el-form-item style="color:red">
                        <span>* 提现规则 *</span>
                        <span v-if="applyCashRule.ruleType ===1">
                        月结:{{applyCashRule.ruleMonth}}
                    </span>
                        <span v-if="applyCashRule.ruleType ===2">
                        日结:{{applyCashRule.ruleDay}}
                    </span>
                    </el-form-item>

                </template>


            </el-form>

            <!--可提现订单表格-->
            <el-table size="small" ref="orderAccountTable"
                      :data="orderAccountData"
                      @sort-change="sortChange"
                      :row-class-name="tableRowClassName"
                      border style="width: 100%" >

                <el-table-column    type="selection"  width="55"  >  </el-table-column>

                <el-table-column   index="order_account_id" prop="orderAccountId"  label="订单金额ID" sortable="custom" >  </el-table-column>

                <el-table-column    prop="orderId"  label="订单ID" width="150"  >  </el-table-column>

                <el-table-column    prop="sellerName"  label="商家"  width="200">  </el-table-column>

                <el-table-column    prop="isAllotText"  label="分配"  >  </el-table-column>

                <el-table-column    prop="statusText"  label="订单状态"  >  </el-table-column>

                <el-table-column    prop="source"  label="订单来源"  >  </el-table-column>

                <el-table-column    prop="totalAmount"  label="商品总值"  >  </el-table-column>

                <el-table-column    prop="costFreight"  label="配送费用"  >  </el-table-column>

                <el-table-column    prop="discount"  label="调价"  >  </el-table-column>

                <el-table-column    prop="pmtGoods"  label="商品促销优惠"  >  </el-table-column>

                <el-table-column    prop="pmtOrder"  label="优惠卷优惠"  >  </el-table-column>

                <el-table-column    prop="pmtRandom"  label="随机立减"  >  </el-table-column>

                <el-table-column    prop="payed"  label="已支付金额"  >  </el-table-column>

                <el-table-column    prop="payment"  label="支付方式"  >  </el-table-column>

                <el-table-column  index="order_create_time"  prop="orderCreateTime"  label="下单时间" sortable="custom"  width="150" >  </el-table-column>

                <el-table-column  index="received_time" prop="receivedTime"  label="收货时间" sortable="custom" width="150"  >  </el-table-column>

                <el-table-column  index="fund_state"  prop="fundStateText"  label="打款状态" sortable="custom" >  </el-table-column>

            </el-table>

            <!--分页插件-->
            <div style="text-align: center;margin: 15px">
                <el-pagination
                        @size-change="handleSizeChange"
                        @current-change="handleCurrentChange"
                        :current-page="page.currentPage"
                        :page-sizes="page.pageSizes"
                        :page-size="page.pageSize"
                        layout="total, sizes, prev, pager, next"
                        :total="page.total">
                </el-pagination>
            </div>
        </el-tab-pane>

        <el-tab-pane label="提现记录" name="third">
            <zy-apply-cash-log ref="zyApplyCashLog">
                提现记录组件
            </zy-apply-cash-log>
        </el-tab-pane>
    </el-tabs>

    <el-dialog :title="'提现金额 【'+applyCashForm.totalMoney+'】'" :visible.sync="dialogConfirm"   width="400px">
        <el-form :model="msgCheck" size="small" label-width="80px" >
            <el-form-item label="手机号" >
                <el-col :span="16">
                    <el-input v-model="msgCheck.mobile" disabled></el-input>
                </el-col>
                <el-col class="line" :span="2">&nbsp;</el-col>
                <el-col :span="4">
                    <el-button type="warning" @click="sendMsg">发&nbsp;&nbsp;送</el-button>
                </el-col>
            </el-form-item>
            <el-form-item label="验证码" width="240px" required>
                <el-input v-model="msgCheck.verifyCode" ></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="dialogConfirm = false">取 消</el-button>
            <el-button size="small" type="primary" @click="confirmApplyCash">确 定</el-button>
        </div>
    </el-dialog>

</div>
<!--<script type="text/javascript" src ="https://cdn.polyfill.io/v2/polyfill.min.js?features=es6"></script>
<script src="https://cdn.bootcss.com/babel-core/5.8.34/browser.min.js"></script>-->
<script src="${request.contextPath}/statics/js/modules/capital/applyCashLogComponent.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/js/modules/capital/applyCashTwb.js?_${.now?long}"></script>
</body>
</html>